// GSDatashow.h: interface for the CShowTrack class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_GSDATASHOW_H__71E46D11_F94B_4DAE_B69B_ECA54C7BD6C6__INCLUDED_)
#define AFX_GSDATASHOW_H__71E46D11_F94B_4DAE_B69B_ECA54C7BD6C6__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <list>
#include <iterator>
class CShowTrack: public CStatic  
{
public:
	CShowTrack();
	virtual ~CShowTrack();
public:

	
	void AddValue(double dValue1,double dValue2);
	void Clear();
	void UpdateCurve();
	void SetDimT(double newDimT);
	void SetDimy(double newDimY);
	void SetXAxisZeroPoint(CString StartOfXAxis);
	void SetYAxisZeroPoint(CString StartOfYAxis);
    void SetXAxisGridNuber(CString XAxisGridNuber);
	void SetYAxisGridNuber(CString YAxisGridNuber);
private: 
	int ConvertXValueToAxisX(double dvalue);
	int ConvertYValueToAxisY(double dValue);
	void DrawCurvePanel(CDC *pDC);
	void DrawGrid(CDC *pDC);
	void DrawCurve(CDC *pDC);
	void DrawAxis(CDC *pDC);
	//void DrawTrack(CDC *pDC,BOOL bPressed);
	void DrawArrow(CDC *pDC,int nIndex,BOOL bLighted);

	
private:
	
	
	CRect	m_rectCurve;
	CRect	m_rectValue;
	CRect   m_rectCurvePanel;
	CRect   m_rectButtonPanel;
	CRect   m_rectScroll;
	
	CRgn	m_rgnCurve;
	CRgn	m_rgnYPlus;
	CRgn	m_rgnYMinus;
	CRgn	m_rgnTPlus;
	CRgn	m_rgnTMinus;
    
	
	
	CBrush  m_BkBrush;
	CBrush  m_PanelBrush;
	CBrush  m_CurveBrush;
	
	CPen    m_PenCurve;
	
	CPen    m_PenGrid;
	
	CPen    m_PenDarkLine;
	
	CFont   m_FontAxis;
	
	   
	double  m_dDimX;
	double  m_dDimY;
	double  m_dValue;
	
	
	int     m_nArrowIndex;
	
	BOOL    m_bPressed;
	BOOL	m_bDrawing;
	
	
	std::list<double> m_ValueList1;
	std::list<double> m_ValueList2;
	
	int numberofYgrid;
	int numberofXgrid;
	CString StartvalueofYAxis;
    CString centervalueofXAxis;
    CString StartvalueofXAxis;
	
    POINT PointLeftTop;
	
	
	// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CShowTrack)
protected:
	virtual void PreSubclassWindow();
	//}}AFX_VIRTUAL
	
	// Implementation
protected:
	
	//{{AFX_MSG(CShowTrack)
	afx_msg BOOL OnEraseBkgnd(CDC* pDC);
	afx_msg void OnPaint();
	afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void OnMouseMove(UINT nFlags, CPoint point);
	afx_msg UINT OnNcHitTest(CPoint point);

	//}}AFX_MSG
	
	DECLARE_MESSAGE_MAP()
		
		
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_SCOPE1_H__20373609_0B81_493C_8F94_B4644298A84F__INCLUDED_)
